<%    
time_type = {
               "单日24小时" => "24h",
               "同小时比较" => "same_hour",
               "连续时间" => "sequence"
              }
%>
<tr>
  <td>选择时间范围</td>
  <td>
    <% time_type.each do |key, value| %>
      <% checked = false %>
      <% checked = true if value == "24h" %>
    <input type="radio" name='time_type' id="<%= "time_type_#{value}"%>" <% if checked == true %>checked="checked"<% end %> value="<%= value %>" 
      onclick="<%=remote_function(:url => {:action => 'time_type_changed', :time_type => value}) %>" /><%= key %>
    <% end %>
  </td>
</tr>
